import { Column, Entity, PrimaryColumn } from 'typeorm';

@Entity({ name: 'apply_list' })
export class ApplyEntity {
    @PrimaryColumn('varchar', { name: 'id', charset: 'utf8mb4', collation: 'utf8mb4_general_ci' })
    id: string;

    // 设备sn，必填
    @Column({ name: 'device_sn', type: 'varchar',  charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    deviceSn: string;

    // 申请使用日期：2024-08-15，必填
    @Column({ name: 'apply_use_date', type: 'varchar',  charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    applyUseDate: string;

    // 申请使用时段：09:20-09:35，必填
    @Column({ name: 'apply_use_time_range', type: 'varchar',  charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    applyUseTimeRange: string;

    // 申请人账号id accountId，必填
    @Column({ name: 'apply_account_id', type: 'varchar',  charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    applyAccountId: string;

    // 审批的人员账号id列表，以英文逗号分隔：88234,87645
    @Column({ name: 'approve_account_id_list', type: 'varchar',  charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true})
    approveAccountIdList: string;

    // 下一个审批人accountId
    @Column({ name: 'next_approve_account_id', type: 'varchar',  charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true})
    nextApproveAccountId: string;

    // 申请时间(毫秒) timestamp 1724222124945，必填
    @Column({ name: 'apply_time', type: 'varchar',  charset: 'utf8mb4', collation: 'utf8mb4_general_ci', })
    applyTime: string;

    // 申请备注
    @Column({ name: 'apply_remark', type: 'varchar',  charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true })
    applyRemark: string;

    // 申请状态： 待审批1，审批通过2，审批拒绝3，已取消4
    @Column('int', { name: 'status' })
    status: number;

}
